package com.wie.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 存放邮箱验证码用于校验
 * @TableName email
 */
@TableName(value ="email")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Email {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 邮箱账号
     */
    @TableField(value = "email")
    private String email;

    /**
     * 验证码
     */
    @TableField(value = "code")
    private Integer code;

    /**
     * 验证码发送时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 验证码过期时间
     */
    @TableField(value = "expiration_time")
    private LocalDateTime expirationTime;
}